<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>下拉菜单</title>
</head>
<body>
<h2>下拉菜单</h2>
<p>鼠标移动到按钮上显示下拉菜单</p>

<div class="dropdown">
    <button class="dropbtn">下拉菜单</button>
    <div class="dropdown-content">
        <a href="#">链接 1</a>
        <a href="#">链接 2</a>
        <a href="#">链接 3</a>
    </div>
</div>
<style>
    .dropdown{

        position: relative;
        display: inline-block;
    }
    .dropdown-content{
      display: none;
        position: absolute;
    }
    .dropdown-content a{
        display: block;
        color: black;
        text-decoration: none;

        background-color: lightgray;
    }
    .dropdown-content a:hover{
        background-color: gray;
    }
    .dropdown:hover .dropdown-content {
        display: block;
    }


</style>
</body>
</html>
